package org.lmind.brick.library;

import java.io.File;

import org.apache.log4j.xml.DOMConfigurator;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;

public class Activator implements BundleActivator {

	@Override
	public void start(BundleContext context) throws Exception {
		
		File file = context.getDataFile("log4j.xml");
		System.out.println("files" + file);
		if (file != null && file.exists()) {
			DOMConfigurator.configure(file.toString());
		}
	}

	@Override
	public void stop(BundleContext context) throws Exception {
		// TODO Auto-generated method stub
		
	}
	
}
